package com.gopay.common.constants.bank;

/**
 * 民生扫码支付订单查询状态吗
 * @author jiangxiangjiao
 */
public enum CmbcQueryRespone {
	/**
	 * 报文解析异常：包括格式不合法、必输请求项为空等、版本号错误等
	 */
	ILLEGAL_REQ_MSG("100001","报文不合法"),
	COOPERATION_NOT_IDENTIFY("100002","合作方无法识别"),
	MSG_VERIFY_FALSE("100003","报文签名校验不通过"),
	DECRYPT_EXCEPTION("100004","交互解密异常"),
	TRANCODE_NOT_EXITS("100005","交易服务码不存在"),
	TRANSFORM_ERROR("100006","转换数据错误"),
	UNPACK_ERROR("100007","解包失败"),
	MAC_VERIFY_FALSE("100008","MAC校验失败"),
	WAITING("100009","该交易维护中,请稍等再试(交易关闭)"),
	PUBLICKEY_NOT_SUPPORT("100010","合作方公钥未提供"),
	DECRYPT_AES_FALSE("100011","解密AES密钥时失败"),
	MSG_DECRYPT_FALSE("100012","报文解密失败"),
	ORDER_TOO_LONG("100013","请求流水号超长");
	
	private String key;
    public String value;

    CmbcQueryRespone(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (CmbQueryRespone info : CmbQueryRespone.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public String getValue() {
       return this.value;
    }


}
